3.279 \(\int \frac{(e+f x) \text{sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\)

Optimal. Leaf size=158 \[ \frac{f \text{sech}^2(c+d x)}{6 a d^2}-\frac{i f \tan ^{-1}(\sinh (c+d x))}{6 a d^2}-\frac{2 f \log (\cosh (c+d x))}{3 a d^2}-\frac{i f \tanh (c+d x) \text{sech}(c+d x)}{6 a d^2}+\frac{2 (e+f x) \tanh (c+d x)}{3 a d}+\frac{i (e+f x) \text{sech}^3(c+d x)}{3 a d}+\frac{(e+f x) \tanh (c+d x) \text{sech}^2(c+d x)}{3 a d} \]

[Out]

((-I/6)*f*ArcTan[Sinh[c + d*x]])/(a*d^2) - (2*f*Log[Cosh[c + d*x]])/(3*a*d^2) + (f*Sech[c + d*x]^2)/(6*a*d^2)
+ ((I/3)*(e + f*x)*Sech[c + d*x]^3)/(a*d) + (2*(e + f*x)*Tanh[c + d*x])/(3*a*d) - ((I/6)*f*Sech[c + d*x]*Tanh[
c + d*x])/(a*d^2) + ((e + f*x)*Sech[c + d*x]^2*Tanh[c + d*x])/(3*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.157548, antiderivative size = 158, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.241, Rules used = {5571, 4185, 4184, 3475, 5451, 3768, 3770} \[ \frac{f \text{sech}^2(c+d x)}{6 a d^2}-\frac{i f \tan ^{-1}(\sinh (c+d x))}{6 a d^2}-\frac{2 f \log (\cosh (c+d x))}{3 a d^2}-\frac{i f \tanh (c+d x) \text{sech}(c+d x)}{6 a d^2}+\frac{2 (e+f x) \tanh (c+d x)}{3 a d}+\frac{i (e+f x) \text{sech}^3(c+d x)}{3 a d}+\frac{(e+f x) \tanh (c+d x) \text{sech}^2(c+d x)}{3 a d} \]

Antiderivative was successfully verified.

[In]

Int[((e + f*x)*Sech[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]

[Out]

((-I/6)*f*ArcTan[Sinh[c + d*x]])/(a*d^2) - (2*f*Log[Cosh[c + d*x]])/(3*a*d^2) + (f*Sech[c + d*x]^2)/(6*a*d^2)
+ ((I/3)*(e + f*x)*Sech[c + d*x]^3)/(a*d) + (2*(e + f*x)*Tanh[c + d*x])/(3*a*d) - ((I/6)*f*Sech[c + d*x]*Tanh[
c + d*x])/(a*d^2) + ((e + f*x)*Sech[c + d*x]^2*Tanh[c + d*x])/(3*a*d)

Rule 5571

Int[(((e_.) + (f_.)*(x_))^(m_.)*Sech[(c_.) + (d_.)*(x_)]^(n_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Sym
bol] :> Dist[1/a, Int[(e + f*x)^m*Sech[c + d*x]^(n + 2), x], x] + Dist[1/b, Int[(e + f*x)^m*Sech[c + d*x]^(n +
 1)*Tanh[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && IGtQ[m, 0] && EqQ[a^2 + b^2, 0]

Rule 4185

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_)), x_Symbol] :> -Simp[(b^2*(c + d*x)*Cot[e + f*x]*
(b*Csc[e + f*x])^(n - 2))/(f*(n - 1)), x] + (Dist[(b^2*(n - 2))/(n - 1), Int[(c + d*x)*(b*Csc[e + f*x])^(n - 2
), x], x] - Simp[(b^2*d*(b*Csc[e + f*x])^(n - 2))/(f^2*(n - 1)*(n - 2)), x]) /; FreeQ[{b, c, d, e, f}, x] && G
tQ[n, 1] && NeQ[n, 2]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 5451

Int[((c_.) + (d_.)*(x_))^(m_.)*Sech[(a_.) + (b_.)*(x_)]^(n_.)*Tanh[(a_.) + (b_.)*(x_)]^(p_.), x_Symbol] :> -Si
mp[((c + d*x)^m*Sech[a + b*x]^n)/(b*n), x] + Dist[(d*m)/(b*n), Int[(c + d*x)^(m - 1)*Sech[a + b*x]^n, x], x] /
; FreeQ[{a, b, c, d, n}, x] && EqQ[p, 1] && GtQ[m, 0]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{(e+f x) \text{sech}^2(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac{i \int (e+f x) \text{sech}^3(c+d x) \tanh (c+d x) \, dx}{a}+\frac{\int (e+f x) \text{sech}^4(c+d x) \, dx}{a}\\ &=\frac{f \text{sech}^2(c+d x)}{6 a d^2}+\frac{i (e+f x) \text{sech}^3(c+d x)}{3 a d}+\frac{(e+f x) \text{sech}^2(c+d x) \tanh (c+d x)}{3 a d}+\frac{2 \int (e+f x) \text{sech}^2(c+d x) \, dx}{3 a}-\frac{(i f) \int \text{sech}^3(c+d x) \, dx}{3 a d}\\ &=\frac{f \text{sech}^2(c+d x)}{6 a d^2}+\frac{i (e+f x) \text{sech}^3(c+d x)}{3 a d}+\frac{2 (e+f x) \tanh (c+d x)}{3 a d}-\frac{i f \text{sech}(c+d x) \tanh (c+d x)}{6 a d^2}+\frac{(e+f x) \text{sech}^2(c+d x) \tanh (c+d x)}{3 a d}-\frac{(i f) \int \text{sech}(c+d x) \, dx}{6 a d}-\frac{(2 f) \int \tanh (c+d x) \, dx}{3 a d}\\ &=-\frac{i f \tan ^{-1}(\sinh (c+d x))}{6 a d^2}-\frac{2 f \log (\cosh (c+d x))}{3 a d^2}+\frac{f \text{sech}^2(c+d x)}{6 a d^2}+\frac{i (e+f x) \text{sech}^3(c+d x)}{3 a d}+\frac{2 (e+f x) \tanh (c+d x)}{3 a d}-\frac{i f \text{sech}(c+d x) \tanh (c+d x)}{6 a d^2}+\frac{(e+f x) \text{sech}^2(c+d x) \tanh (c+d x)}{3 a d}\\ \end{align*}

Mathematica [A]  time = 1.13355, size = 194, normalized size = 1.23 \[ \frac{2 d (e+f x) (\cosh (2 (c+d x))-2 i \sinh (c+d x))+\cosh (c+d x) \left (-i \sinh (c+d x) \left (2 f \tan ^{-1}\left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )-4 i f \log (\cosh (c+d x))-c f+d e\right )-2 f \tan ^{-1}\left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )+4 i f \log (\cosh (c+d x))+c f-d e-i f\right )}{6 a d^2 (\sinh (c+d x)-i) \left (\cosh \left (\frac{1}{2} (c+d x)\right )-i \sinh \left (\frac{1}{2} (c+d x)\right )\right ) \left (\cosh \left (\frac{1}{2} (c+d x)\right )+i \sinh \left (\frac{1}{2} (c+d x)\right )\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)*Sech[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]

[Out]

(2*d*(e + f*x)*(Cosh[2*(c + d*x)] - (2*I)*Sinh[c + d*x]) + Cosh[c + d*x]*(-(d*e) - I*f + c*f - 2*f*ArcTan[Tanh
[(c + d*x)/2]] + (4*I)*f*Log[Cosh[c + d*x]] - I*(d*e - c*f + 2*f*ArcTan[Tanh[(c + d*x)/2]] - (4*I)*f*Log[Cosh[
c + d*x]])*Sinh[c + d*x]))/(6*a*d^2*(Cosh[(c + d*x)/2] - I*Sinh[(c + d*x)/2])*(Cosh[(c + d*x)/2] + I*Sinh[(c +
 d*x)/2])*(-I + Sinh[c + d*x]))

________________________________________________________________________________________

Maple [A]  time = 0.164, size = 143, normalized size = 0.9 \begin{align*}{\frac{4\,fx}{3\,da}}+{\frac{4\,cf}{3\,a{d}^{2}}}-{\frac{{\frac{i}{3}} \left ( -8\,dfx{{\rm e}^{dx+c}}+f{{\rm e}^{3\,dx+3\,c}}-8\,de{{\rm e}^{dx+c}}+f{{\rm e}^{dx+c}}+4\,idfx+4\,ide \right ) }{ \left ({{\rm e}^{dx+c}}+i \right ) \left ({{\rm e}^{dx+c}}-i \right ) ^{3}{d}^{2}a}}-{\frac{5\,f\ln \left ({{\rm e}^{dx+c}}-i \right ) }{6\,a{d}^{2}}}-{\frac{f\ln \left ({{\rm e}^{dx+c}}+i \right ) }{2\,a{d}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)*sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x)

[Out]

4/3*f*x/a/d+4/3*f/a/d^2*c-1/3*I*(-8*d*f*x*exp(d*x+c)+f*exp(3*d*x+3*c)-8*d*e*exp(d*x+c)+f*exp(d*x+c)+4*I*d*f*x+
4*I*d*e)/(exp(d*x+c)+I)/(exp(d*x+c)-I)^3/d^2/a-5/6*f/a/d^2*ln(exp(d*x+c)-I)-1/2*f/a/d^2*ln(exp(d*x+c)+I)

________________________________________________________________________________________

Maxima [A]  time = 1.33948, size = 339, normalized size = 2.15 \begin{align*} \frac{1}{6} \, f{\left (\frac{24 \,{\left (4 i \, d x e^{\left (4 \, d x + 4 \, c\right )} +{\left (8 \, d x e^{\left (3 \, c\right )} + e^{\left (3 \, c\right )}\right )} e^{\left (3 \, d x\right )} + e^{\left (d x + c\right )}\right )}}{12 i \, a d^{2} e^{\left (4 \, d x + 4 \, c\right )} + 24 \, a d^{2} e^{\left (3 \, d x + 3 \, c\right )} + 24 \, a d^{2} e^{\left (d x + c\right )} - 12 i \, a d^{2}} - \frac{3 \, \log \left ({\left (e^{\left (d x + c\right )} + i\right )} e^{\left (-c\right )}\right )}{a d^{2}} - \frac{5 \, \log \left (-i \,{\left (i \, e^{\left (d x + c\right )} + 1\right )} e^{\left (-c\right )}\right )}{a d^{2}}\right )} + 4 \, e{\left (\frac{2 \, e^{\left (-d x - c\right )}}{{\left (6 \, a e^{\left (-d x - c\right )} + 6 \, a e^{\left (-3 \, d x - 3 \, c\right )} - 3 i \, a e^{\left (-4 \, d x - 4 \, c\right )} + 3 i \, a\right )} d} + \frac{i}{{\left (6 \, a e^{\left (-d x - c\right )} + 6 \, a e^{\left (-3 \, d x - 3 \, c\right )} - 3 i \, a e^{\left (-4 \, d x - 4 \, c\right )} + 3 i \, a\right )} d}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

1/6*f*(24*(4*I*d*x*e^(4*d*x + 4*c) + (8*d*x*e^(3*c) + e^(3*c))*e^(3*d*x) + e^(d*x + c))/(12*I*a*d^2*e^(4*d*x +
 4*c) + 24*a*d^2*e^(3*d*x + 3*c) + 24*a*d^2*e^(d*x + c) - 12*I*a*d^2) - 3*log((e^(d*x + c) + I)*e^(-c))/(a*d^2
) - 5*log(-I*(I*e^(d*x + c) + 1)*e^(-c))/(a*d^2)) + 4*e*(2*e^(-d*x - c)/((6*a*e^(-d*x - c) + 6*a*e^(-3*d*x - 3
*c) - 3*I*a*e^(-4*d*x - 4*c) + 3*I*a)*d) + I/((6*a*e^(-d*x - c) + 6*a*e^(-3*d*x - 3*c) - 3*I*a*e^(-4*d*x - 4*c
) + 3*I*a)*d))

________________________________________________________________________________________

Fricas [A]  time = 2.29769, size = 527, normalized size = 3.34 \begin{align*} \frac{8 \, d f x e^{\left (4 \, d x + 4 \, c\right )} + 8 \, d e +{\left (-16 i \, d f x - 2 i \, f\right )} e^{\left (3 \, d x + 3 \, c\right )} +{\left (16 i \, d e - 2 i \, f\right )} e^{\left (d x + c\right )} -{\left (3 \, f e^{\left (4 \, d x + 4 \, c\right )} - 6 i \, f e^{\left (3 \, d x + 3 \, c\right )} - 6 i \, f e^{\left (d x + c\right )} - 3 \, f\right )} \log \left (e^{\left (d x + c\right )} + i\right ) -{\left (5 \, f e^{\left (4 \, d x + 4 \, c\right )} - 10 i \, f e^{\left (3 \, d x + 3 \, c\right )} - 10 i \, f e^{\left (d x + c\right )} - 5 \, f\right )} \log \left (e^{\left (d x + c\right )} - i\right )}{6 \, a d^{2} e^{\left (4 \, d x + 4 \, c\right )} - 12 i \, a d^{2} e^{\left (3 \, d x + 3 \, c\right )} - 12 i \, a d^{2} e^{\left (d x + c\right )} - 6 \, a d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

(8*d*f*x*e^(4*d*x + 4*c) + 8*d*e + (-16*I*d*f*x - 2*I*f)*e^(3*d*x + 3*c) + (16*I*d*e - 2*I*f)*e^(d*x + c) - (3
*f*e^(4*d*x + 4*c) - 6*I*f*e^(3*d*x + 3*c) - 6*I*f*e^(d*x + c) - 3*f)*log(e^(d*x + c) + I) - (5*f*e^(4*d*x + 4
*c) - 10*I*f*e^(3*d*x + 3*c) - 10*I*f*e^(d*x + c) - 5*f)*log(e^(d*x + c) - I))/(6*a*d^2*e^(4*d*x + 4*c) - 12*I
*a*d^2*e^(3*d*x + 3*c) - 12*I*a*d^2*e^(d*x + c) - 6*a*d^2)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*sech(d*x+c)**2/(a+I*a*sinh(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.21864, size = 352, normalized size = 2.23 \begin{align*} \frac{8 \, d f x e^{\left (4 \, d x + 4 \, c\right )} - 16 i \, d f x e^{\left (3 \, d x + 3 \, c\right )} - 3 \, f e^{\left (4 \, d x + 4 \, c\right )} \log \left (e^{\left (d x + c\right )} + i\right ) + 6 i \, f e^{\left (3 \, d x + 3 \, c\right )} \log \left (e^{\left (d x + c\right )} + i\right ) + 6 i \, f e^{\left (d x + c\right )} \log \left (e^{\left (d x + c\right )} + i\right ) - 5 \, f e^{\left (4 \, d x + 4 \, c\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + 10 i \, f e^{\left (3 \, d x + 3 \, c\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + 10 i \, f e^{\left (d x + c\right )} \log \left (e^{\left (d x + c\right )} - i\right ) + 8 \, d e - 2 i \, f e^{\left (3 \, d x + 3 \, c\right )} + 16 i \, d e^{\left (d x + c + 1\right )} - 2 i \, f e^{\left (d x + c\right )} + 3 \, f \log \left (e^{\left (d x + c\right )} + i\right ) + 5 \, f \log \left (e^{\left (d x + c\right )} - i\right )}{6 \, a d^{2} e^{\left (4 \, d x + 4 \, c\right )} - 12 i \, a d^{2} e^{\left (3 \, d x + 3 \, c\right )} - 12 i \, a d^{2} e^{\left (d x + c\right )} - 6 \, a d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*sech(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

(8*d*f*x*e^(4*d*x + 4*c) - 16*I*d*f*x*e^(3*d*x + 3*c) - 3*f*e^(4*d*x + 4*c)*log(e^(d*x + c) + I) + 6*I*f*e^(3*
d*x + 3*c)*log(e^(d*x + c) + I) + 6*I*f*e^(d*x + c)*log(e^(d*x + c) + I) - 5*f*e^(4*d*x + 4*c)*log(e^(d*x + c)
 - I) + 10*I*f*e^(3*d*x + 3*c)*log(e^(d*x + c) - I) + 10*I*f*e^(d*x + c)*log(e^(d*x + c) - I) + 8*d*e - 2*I*f*
e^(3*d*x + 3*c) + 16*I*d*e^(d*x + c + 1) - 2*I*f*e^(d*x + c) + 3*f*log(e^(d*x + c) + I) + 5*f*log(e^(d*x + c)
- I))/(6*a*d^2*e^(4*d*x + 4*c) - 12*I*a*d^2*e^(3*d*x + 3*c) - 12*I*a*d^2*e^(d*x + c) - 6*a*d^2)